pkgname=avocado
pkgver=git
pkgrel=1
arch=('i386' 'x86_64')
url="https://github.com/avocado-framework"
license=('GPL')
source=("https://github.com/avocado-framework/avocado.git" "https://github.com/intel/lkvs.git" "https://github.com/tianocore/edk2.git")
md5sums=('SKIP' 'SKIP' 'SKIP')

. $LKP_SRC/lib/debug.sh
. $LKP_SRC/lib/install.sh
. $LKP_SRC/lib/reproduce-log.sh
. $LKP_SRC/lib/tests/pkgbuild.sh

build()
{
	cd "$srcdir/$pkgname"

	build_edk2
}

package()
{
	local avocado_data_dir="/lkp/benchmarks/avocado/data"
	pack_avocado_vt $avocado_data_dir

	cp_to_pkg "$(get_pkg_dir $pkgname)/addon/tdx_temp.cfg" "${pkgdir}$avocado_data_dir/avocado-vt/backends/qemu/cfg/"
	cp_to_pkg "$srcdir/lkvs/KVM" "${pkgdir}/lkp/benchmarks/lkvs"

	# required by lkvs/KVM/qemu/tests/x86_cpuid.py
	cp_to_pkg "$srcdir/lkvs/BM" "${pkgdir}/lkp/benchmarks/lkvs"

	pack_edk2
}
